import { createWebHistory } from "vue-router";
import { createRouter } from "vue-router";

const router=createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:'/',
            redirect:'/admin'
        },
        {
            path:'/login',
            component:()=>import('../views/Login/index.vue')
        },
        {
            path:'/admin',
            component:()=>import('../views/Admin/index.vue'),
            redirect:'/admin/TableShow',
            children:[
                {
                    path:'TableShow',
                    component:()=>import('../views/TableShow/index.vue'),
                },
                {
                    path:'FormShow',
                    component:()=>import('../views/FormShow/index.vue'),
                },
                {
                    path:'SubMenu1',
                    component:()=>import('../views/SubMenu1/index.vue'),
                },
                {
                    path:'SubMenu2',
                    component:()=>import('../views/SubMenu2/index.vue'),
                },
            ]
        }
    ]
})
export default router